package com.cskaoyan.controller.wxbrand;

import com.cskaoyan.bean.MallBrand;
import com.cskaoyan.model.bo.PageBo;
import com.cskaoyan.model.vo.BaseData;
import com.cskaoyan.model.vo.BaseRespVo;
import com.cskaoyan.service.wxbrand.WxBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: mjm
 * @Date: 2021/12/2
 * @Time: 11:36
 * @Description:
 */
@RestController
@RequestMapping("wx/brand")
public class WxBrandController {

    @Autowired
    WxBrandService brandService;


    /**
     * @description: 获取品牌列表
     * @param:
     * @return:
     */
    @GetMapping("list")
    public BaseRespVo brandList(PageBo pageBo){

        BaseData baseData = brandService.brandList(pageBo);
        return BaseRespVo.ok(baseData);
    }


    /**
     * @description: 获取品牌具体信息
     * @param:
     * @return:
     */
    @GetMapping("detail")
    public BaseRespVo brandDetail(Integer id){
        MallBrand mallBrand = brandService.brandDetail(id);
        return BaseRespVo.ok(mallBrand);
    }
}
